package cn.ym.mall.service;

import cn.ym.mall.entity.Staff;
import cn.ym.mall.vo.Page;

import java.sql.SQLException;
import java.util.List;

public interface StaffService {
    /**
     * 分页查询所有员工
     * @param pageNo
     * @param pageSize
     * @return
     * @throws SQLException
     */
    public Page<Staff> getAll(Integer pageNo, Integer pageSize) throws SQLException;

    /**
     * 添加新员工
     * @param staff
     * @return
     * @throws SQLException
     */
    public boolean add(Staff staff) throws SQLException;

    /**
     * 员工编号移除员工
     * @param stid
     * @return
     * @throws SQLException
     */
    public boolean delete(Integer stid) throws SQLException;

    /**
     * 更新员工信息
     * @param staff
     * @return
     * @throws SQLException
     */
    public boolean update(Staff staff) throws SQLException;

    /**
     * 员工姓名查询员工信息
     * @param stname
     * @return
     * @throws SQLException
     */
    public Staff getStaffByStname(String stname) throws SQLException;

    /**
     * 员工编号查找员工
     * @param stid
     * @return
     * @throws SQLException
     */
    public Staff getStaffByStid(Integer stid) throws SQLException;

    /**
     * 登录验证
     * @param staccount
     * @return
     * @throws SQLException
     */
    public Staff getStaffByStaccount(String staccount) throws SQLException;

    /**
     * 根据角色id查询员工
     * @param rid
     * @return
     * @throws SQLException
     */
    public Page<Staff> getStaffByRid(Integer rid,Integer PageNo,Integer PageSize) throws SQLException;
}
